"""
@author: gaoyx
@date: 2021-12-27 11:29:00
"""
<!-- 通知详情 -->
<template>
  <base-layout title="通知详情" style="background: #fff">
    <div class="page-detail" style="height: 100%">
      <!-- 标题 -->
      <h4>{{ info.strTitle }}</h4>
      <!-- 副标题 -->
      <div class="subhead">
        <span>{{ info.dtPubDate }}</span>
        <span>{{ info.strCreatName }}</span>
      </div>
      <van-divider />
      <!-- 正文 -->
      <div class="content" v-html="info.strContent"></div>
      <div class="page-info">
        <field label="附件" width="auto" style="font-size: 14px">
          <ol>
            <li v-for="(item, index) in info.affixList" :key="index">
              <a @click="appRequest(item.strFileName,item.strPath,12)">
                {{ item.strFileName }}
              </a>
            </li>
          </ol>
        </field>
      </div>
    </div>
  </base-layout>
</template>

<script>
import { zBNoticeMainDetailApi } from 'api/server.js'
export default {
  name: 'notice-detail',
  components: {},
  props: ['id'],
  data () {
    return {
      baseUrl: window.baseUrl,
      info: {}
    }
  },
  computed: {},
  watch: {},
  created () { },
  mounted () {
    if (this.id) {
      this.getDetail(this.id)
    }
  },
  destroyed () { },
  methods: {
    getDetail (id) {
      zBNoticeMainDetailApi({ strId: id }).then((res) => {
        // console.log(res.objList[0].strContent[271])
        this.info = res.objList[0]
        this.info.strContent = this.info.strContent.replaceAll('/ahszfzb', window.baseUrl + '/ahszfzb')

        // console.log(this.info.strContent)
        console.log(this.info.strContent.replaceAll('/ahszfzb', window.baseUrl + '/ahszfzb'))
      })
    }
  }
}
</script>

<style lang='scss' scoped>
::v-deep img {
  max-width: 300px;
}
ol {
  list-style: decimal;
  counter-reset: sectioncouner;
  color: $mainColor;
  li {
    margin-left: 15px;
    font-size: 14px;
    line-height: 22px;
  }
}
</style>